import request from '@/utils/request'

// 查询一级行业列表
export function listTrade(query) {
  return request({
    url: '/system/city/trade/list',
    method: 'get',
    params: query
  })
}


// 查询一级行业集合
export function tradeList(query) {
  return request({
    url: '/system/city/trade/tradeList',
    method: 'get',
    params: query
  })
}

// 查询行业级联选择
export function tradeOptions(query) {
  return request({
    url: '/system/city/trade/tradeOptions',
    method: 'get',
    params: query
  })
}

// 查询一级行业详细
export function getTrade(tradeId) {
  return request({
    url: '/system/city/trade/' + tradeId,
    method: 'get'
  })
}

// 新增一级行业
export function addTrade(data) {
  return request({
    url: '/system/city/trade',
    method: 'post',
    data: data
  })
}

// 修改一级行业
export function updateTrade(data) {
  return request({
    url: '/system/city/trade',
    method: 'put',
    data: data
  })
}

// 删除一级行业
export function delTrade(tradeId) {
  return request({
    url: '/system/city/trade/' + tradeId,
    method: 'delete'
  })
}
